Covid & Economics Case for Rich & Poor Countries. Advanced Visualizations in R.

## Warning: package 'rmdformats' was built under R version 3.6.3

1. Introduction and Objectives

In this project we will look at the Covid data from a different perspective. We will analyze data with regards to world economy. We will look at different countries economic parameters and derive some insights. Basically, we would like to answerd questions such as: which countries have more cases poor countries vs rich countries. We will also group countries by continent and look for patterns they may have. Also, we will show visualization that will tell story about covid and economy relationship. In the second part of the analysis, we will introduce foreign exchange rates and we will at it to derive insights. Our hypothesis is that, those countries who have more covid cases, their exchange rate should fall down and have some devaluation problems. We will also observe data for different continents and groups.

2. Data Source

The data is located on GitHub and it is updated constantly by John Hopkins University. The data is directly sources from GitHub and we use live connecion. https://github.com/owid/covid-19-data/tree/master/public/data

Information about Confirmed cases and deaths comes from the COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University (JHU).

Information about Hospitalizations and intensive care unit (ICU) admissions comes from the European Centre for Disease Prevention and Control (ECDC) for a select number of European countries; the government of the United Kingdom; the COVID Tracking Project for the United States; the COVID-19 Tracker for Canada.

Information about Testing for COVID-19 is collected by the Our World in Data team from official reports;

Information about Vaccinations against COVID-19 is collected by the Our World in Data team from official reports.

The benefit of data is that it is constantly updated.

3. Data Description

Data contains 67,439 rows and 59 variables. Data is increasing since an observation is about one country data per day. Therefore, each day the data points are increasing.

Observations: 67,895
Variables: 59
$ iso_code                              <chr> "AFG", "AFG", "AFG", "AFG", "...
$ continent                             <chr> "Asia", "Asia", "Asia", "Asia...
$ location                              <chr> "Afghanistan", "Afghanistan",...
$ date                                  <date> 2020-02-24, 2020-02-25, 2020...
$ total_cases                           <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 2, 4,...
$ new_cases                             <dbl> 1, 0, 0, 0, 0, 0, 0, 0, 1, 2,...
$ new_cases_smoothed                    <dbl> NA, NA, NA, NA, NA, 0.143, 0....
$ total_deaths                          <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_deaths                            <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_deaths_smoothed                   <dbl> NA, NA, NA, NA, NA, 0, 0, 0, ...
$ total_cases_per_million               <dbl> 0.026, 0.026, 0.026, 0.026, 0...
$ new_cases_per_million                 <dbl> 0.026, 0.000, 0.000, 0.000, 0...
$ new_cases_smoothed_per_million        <dbl> NA, NA, NA, NA, NA, 0.004, 0....
$ total_deaths_per_million              <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_deaths_per_million                <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_deaths_smoothed_per_million       <dbl> NA, NA, NA, NA, NA, 0, 0, 0, ...
$ reproduction_rate                     <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ icu_patients                          <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ icu_patients_per_million              <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ hosp_patients                         <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ hosp_patients_per_million             <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ weekly_icu_admissions                 <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ weekly_icu_admissions_per_million     <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ weekly_hosp_admissions                <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ weekly_hosp_admissions_per_million    <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_tests                             <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ total_tests                           <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ total_tests_per_thousand              <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_tests_per_thousand                <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_tests_smoothed                    <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_tests_smoothed_per_thousand       <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ positive_rate                         <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ tests_per_case                        <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ tests_units                           <chr> NA, NA, NA, NA, NA, NA, NA, N...
$ total_vaccinations                    <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ people_vaccinated                     <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ people_fully_vaccinated               <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_vaccinations                      <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_vaccinations_smoothed             <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ total_vaccinations_per_hundred        <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ people_vaccinated_per_hundred         <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ people_fully_vaccinated_per_hundred   <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ new_vaccinations_smoothed_per_million <lgl> NA, NA, NA, NA, NA, NA, NA, N...
$ stringency_index                      <dbl> 8.33, 8.33, 8.33, 8.33, 8.33,...
$ population                            <dbl> 38928341, 38928341, 38928341,...
$ population_density                    <dbl> 54.422, 54.422, 54.422, 54.42...
$ median_age                            <dbl> 18.6, 18.6, 18.6, 18.6, 18.6,...
$ aged_65_older                         <dbl> 2.581, 2.581, 2.581, 2.581, 2...
$ aged_70_older                         <dbl> 1.337, 1.337, 1.337, 1.337, 1...
$ gdp_per_capita                        <dbl> 1803.987, 1803.987, 1803.987,...
$ extreme_poverty                       <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ cardiovasc_death_rate                 <dbl> 597.029, 597.029, 597.029, 59...
$ diabetes_prevalence                   <dbl> 9.59, 9.59, 9.59, 9.59, 9.59,...
$ female_smokers                        <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ male_smokers                          <dbl> NA, NA, NA, NA, NA, NA, NA, N...
$ handwashing_facilities                <dbl> 37.746, 37.746, 37.746, 37.74...
$ hospital_beds_per_thousand            <dbl> 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,...
$ life_expectancy                       <dbl> 64.83, 64.83, 64.83, 64.83, 6...
$ human_development_index               <dbl> 0.511, 0.511, 0.511, 0.511, 0...

The datatable sample is shown below.

iso_code continent location date total_cases new_cases new_cases_smoothed total_deaths new_deaths new_deaths_smoothed total_cases_per_million new_cases_per_million new_cases_smoothed_per_million total_deaths_per_million new_deaths_per_million new_deaths_smoothed_per_million reproduction_rate icu_patients icu_patients_per_million hosp_patients hosp_patients_per_million weekly_icu_admissions weekly_icu_admissions_per_million weekly_hosp_admissions weekly_hosp_admissions_per_million new_tests total_tests total_tests_per_thousand new_tests_per_thousand new_tests_smoothed new_tests_smoothed_per_thousand positive_rate tests_per_case tests_units total_vaccinations people_vaccinated people_fully_vaccinated new_vaccinations new_vaccinations_smoothed total_vaccinations_per_hundred people_vaccinated_per_hundred people_fully_vaccinated_per_hundred new_vaccinations_smoothed_per_million stringency_index population population_density median_age aged_65_older aged_70_older gdp_per_capita extreme_poverty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers handwashing_facilities hospital_beds_per_thousand life_expectancy human_development_index
AFG Asia Afghanistan 2020-02-24 1 1 NA NA NA NA 0.026 0.026 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 8.33 38928341 54.422 18.6 2.581 1.337 1803.987 NA 597.029 9.59 NA NA 37.746 0.5 64.83 0.511
AFG Asia Afghanistan 2020-02-25 1 0 NA NA NA NA 0.026 0.000 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 8.33 38928341 54.422 18.6 2.581 1.337 1803.987 NA 597.029 9.59 NA NA 37.746 0.5 64.83 0.511
AFG Asia Afghanistan 2020-02-26 1 0 NA NA NA NA 0.026 0.000 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 8.33 38928341 54.422 18.6 2.581 1.337 1803.987 NA 597.029 9.59 NA NA 37.746 0.5 64.83 0.511
AFG Asia Afghanistan 2020-02-27 1 0 NA NA NA NA 0.026 0.000 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 8.33 38928341 54.422 18.6 2.581 1.337 1803.987 NA 597.029 9.59 NA NA 37.746 0.5 64.83 0.511
AFG Asia Afghanistan 2020-02-28 1 0 NA NA NA NA 0.026 0.000 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 8.33 38928341 54.422 18.6 2.581 1.337 1803.987 NA 597.029 9.59 NA NA 37.746 0.5 64.83 0.511

4. Aggregating Data

We will select only important colums such as location, continent, gdp_per_capita, population_density, total_cases, total_cases_per_million, population. This is to use wisely our computation memory and derive useful insights in our graphs. Next step is to remove World and International from the dataset since we will concentrace on countries and those files will be outliers in the graphs.

location continent total_cases gdp_per_capita population_density total_cases_per_million population
Afghanistan Asia 55384 1803.987 54.422 1422.717 38928341
Africa 0 3693025 0.000 0.000 2754.759 0
Albania Europe 87528 11803.431 104.871 30414.900 2877800
Algeria Africa 109559 13913.839 17.348 2498.435 43851043
Andorra Europe 10312 0.000 163.755 133462.758 77265
Angola Africa 20163 5819.495 23.890 613.486 32866268
Antigua and Barbuda North America 316 21490.943 231.845 3226.861 97928
Argentina South America 1993295 18933.907 16.177 44103.567 45195777
Armenia Asia 168300 8787.580 102.931 56796.055 2963234
Asia 0 23729592 0.000 0.000 5114.304 0

6. Grouping Countries by Income

Let’s group coutnries in three countries and observe how many countries we have in each group. We will use GDP_per_capita to define the groups rich, medium and poort countries. Countries between 0-7.000 USD GDP_per_capita we call this group “poor”. The countries with GDP_per_capita between 7.000-20.000 USD, we call them “medium” income countries. And the thirds group is countries with GDP_per_capita more than 20.000 USD.

Looking at the graph we see that 40 countries in Africa are in poor countries categories. We definitely do not want the world to have that many poor countries and especially in one continent. The Europe is the continent with many rich countries and only one poor country which is Moldova. North and South America have many Medium income countries. However, our desire is to have evenly distributed wealth in every continent and countries.

7. Rich vs Poor Countries & Covid Cases

Looking at the below graph we want to answer question, Do rich countries have more covid cases? Graph answers that questions as this is true assumptions - rich countries have more covid cases. We think this is due to the fact the in rich countries population is tested massively and also statistic is kept more accurate to count cases than comparing with poor countries. The poor countries do not count cases successfully and even more critical is that they do not test the population as the test are not available for most of them.

8. Heatmap of I and II Wave of Covid

Below heatmap shows monthly new covid cases for European countries. The Heatmap gives us good demonstration when we have first and the second waves of the corona virus cases spikes. The colors are based on the covid cases. The dark red is a lot of cases while yeallow whiteish is less cases. In the first wave Spain, Italy, Germany and France has a lot of case during March and April in 2020. While during the second wave we see a lot of redish cells during October 2020 and January 2021, especially in the countries such as Spain, Italy, Poland, Germany, France, Belgium and the Netherlands.

library(lubridate)
library(dplyr)
library(tibble)

EU <- c("Austria", "Belgium", "Bulgaria", "Croatia", "Cyprus",
        "Czech Republic", "Denmark", "Estonia", "Finland", "France",
        "Germany", "Greece", "Hungary", "Ireland", "Italy", "Latvia",
        "Lithuania", "Luxembourg", "Malta", "Netherlands", "Poland",
        "Portugal", "Romania", "Slovakia", "Slovenia", "Spain", "Sweden")


data_for_month <- data.frame(data) %>% dplyr::select(location, date, new_cases) %>% 
  filter(location %in% EU)
data <- data.frame(data)

datats <- data.frame(data) %>% dplyr::select(continent, date, total_cases)


data_for_month$month <- floor_date(data_for_month$date, "month")

data_for_month <- as.tibble(data_for_month) %>%
  group_by(location, month) %>%
  summarize(new_cases = as.numeric(sum(new_cases))) 

data_for_month$month<-as.character(data_for_month$month)
data_for_month$new_cases_1000 <- as.numeric(data_for_month$new_cases/1000)
ggplot(data_for_month, aes(month, location)) + 
  geom_tile(aes(fill = new_cases_1000), colour = "white") + 
  labs(title = "Which month had the biggest amount of new cases?",
       subtitle = "First wave in Mar 2020 and the second wave in Sep-Oct 2020!",
       caption = 'Date: 2021-Jan-29') +
  scale_x_discrete("", expand = c(0, 0)) + 
  scale_y_discrete("", expand = c(0, 0)) + 
  scale_fill_gradient2(name= "New Cases 000'",low = "#006400", mid = "#f2f6c3", high = "#cd0000", 
                       midpoint = 0.5, na.value = "white")+
  theme(legend.position = "right",
        axis.ticks = element_blank(), 
        axis.text.x = element_text(angle = 90, hjust = 0.5),
        axis.text.y = element_text(size = 10),
        panel.background = element_blank(),
         plot.title = element_text(size =16, face='bold', 
                                  color = '#0B8389'),
        plot.subtitle = element_text(size = 11))

9. Top 15 Countries by Covid Cases

Let’s observe top 15 countries to see if covid cases are concentrated on one continent or it is spread evenly. Looking at the chart of top 15 countries we can see that only one country is from Africa, country - South Africa. This tells us again a story that rich countries are able to test and count the covid cases well. South Africa is richest country in Africa.

The majory of countries in Top 15 are located in Europe. 7 countries out of 15 are european countries.

Two countries are from North America - United States and Mexico. While South America is represented by three countries, they obviously have the biggest population in the continet. They are Brazil, Colombia and Argentina.

One country from Middle East - Turkey and one country from Asia - India.

10. Covid in Rich Countries

The special scatterplot below is dedicated to answer one question - do mostly rich countries getting infected with virus? With one look the answer is positive, yes, the more GDP_per_capita the more total_cases_per_million. For example, Luxembourg, Qatar and Singapore are top three countries with highest GDP_per_capita, however, they are also on the top of the total_cases_per_million.

Green balls on the top-right represent European countries and they are certainly on the top of the scatter plot by both metrics GDP_per_capita and total_cases_per_million. Contrary, African countries in red are way below in both metrics.

11. Distribution of Wealth by Continents

Does equlity exist between countries in different continents? Let’s study the below histograms. The Europe is more or less normally distributed which is desirable for all other continents, but are the same distribution of GDP_per_capita on different continents?

Africa is mostly on the left side, many poor countries just with small amoount of GDP_per_capita.

Asia, less but North America and South America is more or less normally distributed, however, North America and Asia have outlires such as the United States, Canada, Singapore and Hong Kong.

continent location date new_cases new_deaths total_cases total_deaths total_cases_per_million population
Asia Afghanistan 2020-02-24 1 NA 1 NA 0.026 38928341
Asia Afghanistan 2020-02-25 0 NA 1 NA 0.026 38928341
Asia Afghanistan 2020-02-26 0 NA 1 NA 0.026 38928341
Asia Afghanistan 2020-02-27 0 NA 1 NA 0.026 38928341
Asia Afghanistan 2020-02-28 0 NA 1 NA 0.026 38928341

12. Development of Covid Cases

The racing chart below shows how covid cases were increasing in different continets from the start until now.

The figures show total deaths on the left side and total cases on the right side.

In Asia, India started quite late but it is leading now with the number of covid cases.

In Europe, countries start ver quick on covid cases but fortunately do not climb up on the total deaths axis.

Unfortunately, in US the total deaths side is climbed by the United States and in South America Brazil is following the US trend.

13. World Map

The map represents countries coloured by GDP_per_capita. Darker the color bigger the GDP_per_capita. Th North America, Europe and Australia is mostly dark coloured since their high GDP_per_capita.

Map is interactive and when you hover the country it displays the information about GDP_per_capita, Total cases, Cases per million, population.

14. Loading Exchange Rate Data

We will load the exchange rate data and a mappig file of country with country code so we can join it with the covid data using the Country Code and Date. The exchange rate data is in terms of Euro meaning that in terms of all currency are valued with the base as Euro; for example if exhange rate on a given date for Indian Rupees is 63, it means that on that day, 1 Euro = 63 Indian Rupees. First we load the data and take only the relavent columns and do data type transformations:

                                              
1 function (x, df1, df2, ncp, log = FALSE)    
2 {                                           
3     if (missing(ncp))                       
4         .Call(C_df, x, df1, df2, log)       
5     else .Call(C_dnf, x, df1, df2, ncp, log)
6 }                                           

Next,lets load the mapping file merge it with out covid data:

# A tibble: 6 x 4
# Groups:   date [6]
  date       continent Mean_ex     cases_pm
  <date>     <chr>       <dbl>        <dbl>
1 2020-01-23 Asia         7.69 0.0000000660
2 2020-01-24 Asia         7.65 0.000000192 
3 2020-01-27 Asia         7.65 0.000000557 
4 2020-01-28 Asia         7.63 0.00000183  
5 2020-01-29 Asia         7.63 0.000000402 
6 2020-01-30 Asia         7.65 0.00000143  

15. Animated Line Chart of Exchange Rate Trend by Continent

Here, we will take the average or mean per continent and try to map how they varied during the spread of Covid. This will help us in determing if the Covid affect the exchange rate or not. As we can see from the graph, the continent with the most erratic is Asia, which is line with the cases we on=bserver there because China and India combined had had the largest cases so far in the world. Next comes Africa and North America. Europe has been erractic in the start, but then more or less remained stable.

16. Animated Trend Line Chart of Covid Cases per Capita

In this visual, we want to not only see how the Covid cases progressed overtime, but specifically see how they varied at a per capita level. As you can see Asia, despite high risk countries like India and China is at the bottom because of their populations. Secondly, since October 2020, seems to be at the top, which can maily be becaus eof the less population and the second wave in Europe.

17. Interactive Tree Map of Exchange Rate Fluctuation

Here we provide a different view of how much fluctuation did the Exchage rates of different countries go through overtime across continents in the time period we are observing. In the time period observed, we display the distinct shares of the exchange rate, on any given day, in terms of the maximum value (or the most devalued exchange rate value) that was observed in the time period.The higher the ratio on any given day, the more devalued the currency of that country was on that day. We have the distinct values that were observed in the time period that we are observing, but when we drill down to country level, we see the distinct values in a shape that is insicative of the duration for which that particular value(or share of exchange rate in terms of maximum value) prevailed. This is a more aggregated view as opposed to the trend that we were observing for each day earlier.But, the more the numberof square, the more fluctuation that happened within that particular continent/country. Also, the shade and size is indicative of the value, specified for each country. So the larger the size of the square the higher fluctuation the continent/country went through. The grapg is very

d3tree3

#18. Data Preparation for Regression and Doing a Simple Regression

Here we are just preparing the Data that we would require for doing a simple regression by doing the required merges and joins.

     Code       date location continent total_cases_per_million population gdp_per_capita stringency_index median_age human_development_index CountryCode Currency Exchange_rate
3524  BGN 2020-03-09 Bulgaria    Europe                   0.576    6948445       18563.31            21.30       44.7                   0.816          BG      Lev        1.9558
3525  BGN 2020-03-10 Bulgaria    Europe                   0.576    6948445       18563.31            21.30       44.7                   0.816          BG      Lev        1.9558
3526  BGN 2020-03-11 Bulgaria    Europe                   1.007    6948445       18563.31            26.85       44.7                   0.816          BG      Lev        1.9558
3527  BGN 2020-03-12 Bulgaria    Europe                   1.007    6948445       18563.31            26.85       44.7                   0.816          BG      Lev        1.9558
3528  BGN 2020-03-13 Bulgaria    Europe                   3.310    6948445       18563.31            50.93       44.7                   0.816          BG      Lev        1.9558
 [ reached 'max' / getOption("max.print") -- omitted 1 rows ]
# A tibble: 30 x 10
   continent population gdp_per_capita stringency_index median_age human_development_index Currency Exchange_rate  Norm Norm_cases
   <chr>          <dbl>          <dbl>            <dbl>      <dbl>                   <dbl> <fct>            <dbl> <dbl>      <dbl>
 1 Europe       6948445         18563.             21.3       44.7                   0.816 Lev               1.96     1  0.0000187
 2 Europe       6948445         18563.             21.3       44.7                   0.816 Lev               1.96     1  0.0000187
 3 Europe       6948445         18563.             26.8       44.7                   0.816 Lev               1.96     1  0.0000327
 4 Europe       6948445         18563.             26.8       44.7                   0.816 Lev               1.96     1  0.0000327
 5 Europe       6948445         18563.             50.9       44.7                   0.816 Lev               1.96     1  0.000108 
 6 Europe       6948445         18563.             50.9       44.7                   0.816 Lev               1.96     1  0.000243 
 7 Europe       6948445         18563.             56.5       44.7                   0.816 Lev               1.96     1  0.000313 
 8 Europe       6948445         18563.             70.4       44.7                   0.816 Lev               1.96     1  0.000430 
 9 Europe       6948445         18563.             70.4       44.7                   0.816 Lev               1.96     1  0.000440 
10 Europe       6948445         18563.             70.4       44.7                   0.816 Lev               1.96     1  0.000594 
# ... with 20 more rows

Then we do a very simple regression using the lm function. For noww we are doing a simple regression a we want to provide a quantitaive perspective that we are trying to analyze visually. As we can see from the model the p-value indicates that the number of covid cases is a significant indicator of the exchange rate and we also observe that the Covid cases cofficient is positive, meaning, the higher the value of the the cases (its normalised with population so we interpret it as the higher the value of the cases per capita), the higher the value of the exchange rate (meaning the more fluctuations are observed in the exchange rate of that continent).
But on an overall level, the R- square of the model is pretty low, indicating that the variables explain only 14% of the variation that we observe in the fluxtuation of the exchange rates. This is true because there are many other factors on which Exchange rate depends and we have not taken them as of now.

MODEL INFO:
Observations: 6455
Dependent Variable: Norm
Type: OLS linear regression 

MODEL FIT:
F(6,6448) = 171.66, p = 0.00
R² = 0.14
Adj. R² = 0.14 

Standard errors: OLS
-----------------------------------------------------------
                                Est.   S.E.   t val.      p
---------------------------- ------- ------ -------- ------
(Intercept)                     0.91   0.00   314.31   0.00
Norm_cases                      0.03   0.00    18.63   0.00
continentAsia                   0.02   0.00     6.17   0.00
continentEurope                 0.04   0.00    14.32   0.00
continentNorth America          0.02   0.00     6.57   0.00
continentOceania               -0.00   0.00    -0.78   0.44
continentSouth America         -0.02   0.00    -4.34   0.00
-----------------------------------------------------------

19. How does Exchange Rate differ in a Continent with given no. of Covid Cases

Here we are trying to display the commanity that is observed in all the continents when Covid cases rise: the Currency of the countries on that continent go through a devalution , meaning that Covid has a negative impact in the country’s currency’s value. As we see, in all the bars, the shade is darker on the top parts of them, indicating a high value of the exchange rate, further confirming that higher cOvid cAses is accompanied by a more devalued currency for a given continent.

20. Regrression Fit 1

As we can see fromthe graph, the model is a linear model which predicts a linear rise between Covid cases and Exchange Rate.

21. Regression Fit 2

In this graph, we have also fit of the model, but with data pont displayed. As you can see, Europe us limited to the top of the graph beacse of the exteme traned that was observed both in its exchange rate and covid cases per capita and day. Asia also has some outlier, but those are mostly in cases were covid cases are comparitively low and so is the exchange rate (meaning the more valued the currency of that country is). Th other continents are still closer to the model line.

Conclusion

In this project we analyzed different datasets such as Covid Cases by country and date, economic parameters by country, foreign exchange rates for different countries. We specifically observed rich countries vs poor countries and how the covid developed in each group of countries. We also look at the data by different continents to see the patterns.

We used the advanced visualizations to see the trends, histograms, scatterplots, animated graps to see the insights better than we could derive from the dry tables with only numbers. After running visualizations it is obvious that patterns are much better visible than what we could see without visualizations.

One of the clear insights after analysis is that countries from rich group have more covid cases, this can be explained by different factors: 1. They are able to run testing for their population. 2. They are capable to count the covid cases. Contrary, countries from poor countries are not able to count covid cases and do not have fund to provide free or organized tests for the population.

Outliers are in each continent or region, South Africa in Africa, India in Asia, Turkey in Middle East, United States in North America and Brazil in South America.

While deaths cases are high in North America, South America and Asia, in Europe it is rather steady on lower level. This is point out the high quality health system that European countries have comparing with other countries outside of Europe.

References

  1. Codes and materials provided by the Mgr Piotr Ćwiakowski during the Graduate course in Advanced Visualizations in R, University of Warsaw, Faculty of Economic Sciences
  2. Antoine Soetewey, COVID-19 in Belgium: is it over yet? https://statsandr.com/blog/covid-19-in-belgium-is-it-over-yet/
  3. Data source: https://github.com/owid/covid-19-data/tree/master/public/data
  4. Coronavirus COVID-19 outbreak statistics and forecast v0.86 http://www.bcloud.org/e/
  5. The Top 74 Ggplot2 Open Source Projects https://awesomeopensource.com/projects/ggplot2
  6. gganimate https://github.com/thomasp85/gganimate